<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@include file="../../pageHead.jsp" %>

	<div class="block">
		
		<div class="alert alert-yellow">
		<SPAN class="label label-info">
		  点击对应按钮,选择下一步要执行的活动
		</SPAN>
		</div>
		
		<button id="viewoffice" class="btn btn-primary">
		  <I class="icon-white icon-chevron-left"></I>
		 【上一步】编辑正文
		</button>
			<c:forEach items="${actions}" var="act">
			       <button 
				           action="${act.actionId}" 
						   entity="${act.workflowId}"
						   step="${act.stepId}"
						   class="btn btn-info btn-large actBtn"
						   >
						    
                                                                                                       【下一步】${act.actionName}	
                               <I class="icon-white icon-chevron-right"></I>					 
						  </button>      
				
			</c:forEach>		
	</div>
	<form id="actionform" action="../../admin/form/show/generate-html!saveform" target="_self">
      <input name="showOnly" type="hidden" value="false"/>
      <input name="withform" type="hidden" value="false"/>
	  <input name="workflowId"  type="hidden" id="workflowId" />
	  <input name="actionId"  type="hidden" id="actionId" />
	  <input name="stepId"  type="hidden" id="stepId" />
	</form>
<script type="text/javascript">
$(function(){
	$("#viewoffice").bind("click",function(){		
		var url = "../../admin/office/office-manager!preselect?workflowId=${workflowId}";
		window.open(url, "_self");		
	});
	
	var aform = $("#actionform");
	$("button.actBtn").bind("click",function(){		
		$("#workflowId").val(this.entity);
		$("#actionId").val(this.action);
		$("#stepId").val(this.step);	
		aform.get(0).submit();
	});
	
});
</script>	
<%@include file="../../pageFoot.jsp" %>